The present invention relates to systems and methods for fixed and extremely low memory usage transformation of a document treated as a stream of discrete processing events instead of requiring representation of hierarchical relationships between all elements to be constructed and necessitating traversal of this hierarchical object representation of the document in order to accomplish transformation. More particularly, it relates to systems and protocols for transforming XML documents.
Business-to-business (B2B) and application-to-application (A2A) electronic commerce are replacing former protocols for electronic data interchange (EDI). As businesses strive to improve their efficiency with B2B and A2A systems, a number of incompatible platforms and competing standards have emerged. One need that has been identified is to transform XML documents, typically converting the documents from one system to another. Another reason for transformation is that a standard may have gone through several versions and one end may use the older version the other the newer.
XML has become a widely used type of data because the rigid rules that must be applied to create inline markup make it relatively simple for computer programs to interpret and process the content of textual documents. For example, a purchase order written in XML can be processed by an order entry software application that knows how to read the markup annotations that describe what is being purchased, who the purchaser is, and so forth. Thus, a third reason for a transformation would be to take the information in the purchase order and to use it to produce a response document such as a Shipping Bill containing the purchaser, the items being purchased and other information copied from the first document.
Transformation is a major category of computer processing. A paperless system for transacting business could, in a large-scale marketplace, require the transformation of many thousands of XML documents a day. The XML documents are often quite large in size, with many thousands of individual data elements which must be handled in the transformation. The rules expressing the conversion from input to output may also be very extensive. The response time necessary to complete an individual transformation may be excessively long and the overall demand on computer resources for supporting an enterprise-scale transformation service may grow rapidly to unacceptable proportions.
While there are many different tools which accomplish XML transformation, there is a lack of tools effectively designed to address the issue of performance. The most popular technology used today, XSLT, exacerbates the performance problem by requiring an internal data model that typically is extremely costly in computer resources. Some attempts have been made to alleviate these problems by compiling XSLT conversion statements into a more efficient programming language such as Java or by caching schemes. These approaches do not alter the basic process that is causing the inefficiency.
Accordingly, an opportunity arises to devise methods and structures that efficiently specify and implement XML document transformations.